/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
    background-color: #3498db;
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    margin-right: 20px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
}

.nav-item {
    margin: 0 10px;
    white-space: nowrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 页面内容 */
.content {
    padding: 30px 0;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 3px rgba(52, 152, 219, 0.5);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

/* 漂流瓶样式 */
.bottle {
    position: relative;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    padding: 20px;
    transition: transform 0.3s;
}

.bottle:hover {
    transform: translateY(-5px);
}

.bottle-male {
    border-left: 5px solid #3498db;
}

.bottle-female {
    border-left: 5px solid #e84393;
}

.bottle-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.bottle-author {
    font-weight: bold;
}

.bottle-male .bottle-author {
    color: #3498db;
}

.bottle-female .bottle-author {
    color: #e84393;
}

.bottle-time {
    color: #7f8c8d;
    font-size: 14px;
}

.bottle-content {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
}

.bottle-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottle-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f1f1f1;
    color: #555;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.bottle-btn:hover {
    background-color: #e0e0e0;
}

.bottle-btn i {
    margin-right: 5px;
}

.like-btn.active {
    background-color: #ff6b6b;
    color: white;
}

/* 评论样式 */
.comments {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.comment {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: bold;
}

.comment-male {
    color: #3498db;
}

.comment-female {
    color: #e84393;
}

.comment-time {
    color: #7f8c8d;
    font-size: 12px;
}

.comment-content {
    font-size: 14px;
}

/* 个人资料页 */
.profile-section {
    margin-bottom: 30px;
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    background-color: #3498db;
    color: white;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.profile-avatar.female {
    background-color: #e84393;
}

.profile-username {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.stat-item {
    margin: 0 15px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

.stat-label {
    color: #7f8c8d;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 0;
    }
    
    .navbar-brand {
        font-size: 20px;
        margin-right: 10px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .nav-item {
        margin: 0 5px;
    }
    
    .bottle-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bottle-actions div {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 18px;
    }
    
    .nav-link {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .nav-item {
        margin: 0 3px;
    }
}

/* 提示消息 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 用户名链接样式 */
.username-link {
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.username-link:hover {
    text-decoration: underline;
    color: #0056b3 !important;
}

/* 公告系统样式 */
.announcement-item {
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.announcement-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin: 10px 0;
    white-space: pre-line;
}

#announcement-controls {
    display: flex;
    gap: 8px;
}

#announcement-controls button {
    padding: 4px 8px;
    font-size: 0.875rem;
}

#announcement-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.announcement-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.announcement-item .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
} 